package org.ljx.taobao.api;

import org.ljx.taobao.api.entity.Shopping;

import java.util.List;

/**
 * @Author: Ljx
 * @Date: 2021/12/31 12:20
 * @role: 购物service层接口
 */
public interface IShoppingService {

    /**
     * 购买商品
     * @param shopping 订单实体
     * @return boolean
     */
    boolean commodity(Shopping shopping);

    /**
     * 查询用户购买的商品
     * @return List<Shopping>
     */
    List<Shopping> query();

    /**
     * 删除订单
     * @param shopping 订单实体
     * @return boolean
     */
    boolean delete(Shopping shopping);

    /**
     * 清除购物车
     * @param shopping 订单实体
     * @return boolean
     */
    boolean clear(Shopping shopping);

    /**
     * 订单数量 -1
     * @param shopping 订单实体
     * @return boolean
     */
    boolean decrease(Shopping shopping);

    /**
     * 订单数量 +1
     * @param shopping 订单实体
     * @return boolean
     */
    boolean increase(Shopping shopping);
}

